package com.imachen.ymcc.fegin;

import com.imachen.ymcc.doc.CourseDoc;
import com.imachen.ymcc.fallback.CourseEsFeignClienFallbackFactory;
import com.imachen.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(contextId = "courseEs" ,value = "service-search" , fallbackFactory = CourseEsFeignClienFallbackFactory.class)
public interface CourseEsFeignClien {

    @RequestMapping(value="/course/saveCourseEs",method= RequestMethod.POST)
    JSONResult saveCourseEs(@RequestBody CourseDoc courseDoc);

    @RequestMapping(value="/course/deleteCourseEs/{id}",method= RequestMethod.POST)
    JSONResult deleteCourseEs(@PathVariable("id") Long id);


}
